# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Blogger.V3.Model.Blog do
  @moduledoc """


  ## Attributes

  *   `customMetaData` (*type:* `String.t`, *default:* `nil`) - The JSON custom meta-data for the Blog.
  *   `description` (*type:* `String.t`, *default:* `nil`) - The description of this blog. This is displayed underneath the title.
  *   `id` (*type:* `String.t`, *default:* `nil`) - The identifier for this resource.
  *   `kind` (*type:* `String.t`, *default:* `nil`) - The kind of this entry. Always blogger#blog.
  *   `locale` (*type:* `GoogleApi.Blogger.V3.Model.BlogLocale.t`, *default:* `nil`) - The locale this Blog is set to.
  *   `name` (*type:* `String.t`, *default:* `nil`) - The name of this blog. This is displayed as the title.
  *   `pages` (*type:* `GoogleApi.Blogger.V3.Model.BlogPages.t`, *default:* `nil`) - The container of pages in this blog.
  *   `posts` (*type:* `GoogleApi.Blogger.V3.Model.BlogPosts.t`, *default:* `nil`) - The container of posts in this blog.
  *   `published` (*type:* `String.t`, *default:* `nil`) - RFC 3339 date-time when this blog was published.
  *   `selfLink` (*type:* `String.t`, *default:* `nil`) - The API REST URL to fetch this resource from.
  *   `status` (*type:* `String.t`, *default:* `nil`) - The status of the blog.
  *   `updated` (*type:* `String.t`, *default:* `nil`) - RFC 3339 date-time when this blog was last updated.
  *   `url` (*type:* `String.t`, *default:* `nil`) - The URL where this blog is published.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :customMetaData => String.t() | nil,
          :description => String.t() | nil,
          :id => String.t() | nil,
          :kind => String.t() | nil,
          :locale => GoogleApi.Blogger.V3.Model.BlogLocale.t() | nil,
          :name => String.t() | nil,
          :pages => GoogleApi.Blogger.V3.Model.BlogPages.t() | nil,
          :posts => GoogleApi.Blogger.V3.Model.BlogPosts.t() | nil,
          :published => String.t() | nil,
          :selfLink => String.t() | nil,
          :status => String.t() | nil,
          :updated => String.t() | nil,
          :url => String.t() | nil
        }

  field(:customMetaData)
  field(:description)
  field(:id)
  field(:kind)
  field(:locale, as: GoogleApi.Blogger.V3.Model.BlogLocale)
  field(:name)
  field(:pages, as: GoogleApi.Blogger.V3.Model.BlogPages)
  field(:posts, as: GoogleApi.Blogger.V3.Model.BlogPosts)
  field(:published)
  field(:selfLink)
  field(:status)
  field(:updated)
  field(:url)
end

defimpl Poison.Decoder, for: GoogleApi.Blogger.V3.Model.Blog do
  def decode(value, options) do
    GoogleApi.Blogger.V3.Model.Blog.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Blogger.V3.Model.Blog do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
